package com.yanqu.road.entity.activity.hsisland;

public class HsIslandPosition {

    /**
     * x
     */
    private int x;

    /**
     * y
     */
    private int y;

    public HsIslandPosition() {}

    public HsIslandPosition(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public HsIslandPosition(String key) {
        String[] split = key.split("_");
        this.x = Integer.parseInt(split[0]);
        this.y = Integer.parseInt(split[1]);
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public String getKey() {
        return x + "_" + y;
    }

    public String getKey2() {
        return x + "," + y;
    }
}
